import 'package:boss/provider/store_message_provider.dart';

import 'package:boss/ui/page/personalSettings/widget/personal_setting_browser.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:provider/provider.dart';
import 'package:router/annotation.dart';

@RouterConfig(PersonalSettingPage.pageName)
class PersonalSettingPage extends StatefulWidget {
  static const pageName = '/PersonalSettingPage';

  @override
  PersonalSettingPageState createState() => PersonalSettingPageState('个人中心');

  PersonalSettingPage({Key key}) : super(key: key);
}

class PersonalSettingPageState extends BaseState<PersonalSettingPage> {
  PersonalSettingPageState(String pageName) : super(pageName);

  initData() {
    var storeMessageProvider = Provider.of<StoreMessageProvider>(context, listen: false);
    if (storeMessageProvider.storeMessage == null) {
      storeMessageProvider.initData();
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: PersonalSettingBrowser(),
    );
  }
}
